temp = file.read().splitlines()
# converts read file into a list without newlines temp = file.read().splitlines()
with open('filename.txt') as f: alist = [line.rstrip() for line in f]